FieldServiceDatabase.TestSummary = Ext.extend(Ext.grid.GridPanel, {
    
    loadMask: true,
    id: 'testsummary-panel',
    
    frame: false,
    //        width: 600,
    height: 600,
    autoScroll: true,
    //        collapsible: true,
    
    animCollapse: false,
    region: 'center',
    
    title: 'Testing List',
    

    listener: {
        viewready: function(g){
            g.getSelectionModel().selectFirstRow()
        }
    },
    
    
    viewConfig: {
        forceFit: true
    },
    
    
    initComponent: function(){
        // paging bar on the bottom
        var store = this.store;
        FieldServiceDatabase.TestSummary.superclass.initComponent.call(this, arguments);
        this.getStore().on('exception', function(dp, type, action, options, response){
            Ext.MessageBox.confirm('Error', 'Network Temporarily not available, do you want to try again?', function(btn, text){
                if (btn == 'yes') {
                    this.load({params: options.params})
                }
                else {
                    this.removeAll()
                }
            }, this);
        })
    }
});

Ext.reg('testsummary', FieldServiceDatabase.TestGrid);
